package cn.school.test;

import cn.school.dao.ExamresultMapper;
import cn.school.entity.Result;
import cn.school.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.Scanner;

public class ResultTest {
    public static void main(String[] args) {
        SqlSession session= MybatisUtil.get(false);
        Scanner input=new Scanner(System.in);
        while (true) {
            System.out.println("成绩表操作 2：查询单个 3: 更新");
            int choice = input.nextInt();
            if (choice == 2) {
                ExamresultMapper mapper = session.getMapper(ExamresultMapper.class);
                System.out.println(mapper.getClass().getName());
                Result result= mapper.get(2);
                System.out.println(result);
                session.close();
            }
        }
    }
}
